
<!doctype html>
<html>
<head>
<title>新增考勤排班</title> <#include "../../commonUse.html"/>

<script
	src="${ctx.contextPath}/pages/business/attendance/js/attendance_add.js"></script>
<script src="${ctx.contextPath}/js/validator.js"></script>
</head>
<body>
	<div class="smart-body">
	<div class="border1pxe6">
		<div class="layui-layer-title">新增考勤排班</div>
		<div class="smart-cell smart-cell_lt">
			<blockquote class="layui-elem-quote layui-quote-nm">设置考勤时间</blockquote>
			<form id="form1" action="" class="layui-form">
				<div class="layui-form-item">
					<label class="layui-form-label">排班名称<font
						class="smart-required">*</font></label>
					<div class="layui-input-inline">
						<input type="text" name="orgName" id="orgName" placeholder="请输入"
							class="layui-input" maxlength="10"  dataType="LimitA" msg="排班名称不能为空.">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">所属项目<font
						class="smart-required">*</font></label>
					<div class="layui-input-inline">
						<select id="engineerId" name="engineerId"
							class="smart-body_select" dataType="LimitA" msg="所属项目不能为空.">
							<option VALUE="">请选择</option>
							<#list projectList as l>
                               <option VALUE="${l.PROJECT_ID}">${l.PROJECT_NAME}</option>
                             </#list>
						</select> <input type="hidden" name="engineerName" id="engineerName" />
					</div>
				</div>
				<div class="layui-form-item">
					<div class="layui-inline">
						<label class="layui-form-label">有效日期<font
							class="smart-required">*</font></label>
						<div class="layui-input-inline" style="width: 115px;">
							<input readonly="readonly" name="begTime" style="width: 115px;"
								id="begTime" type="text" class="search_input_sc Wdate"
								class="text" dataType="LimitA" msg="有效开始时间不能为空."
								onclick="WdatePicker({maxDate:'#F{$dp.$D(\'endTime\')}'})" />
						</div>
						<div class="layui-form-mid">-</div>
						<div class="layui-input-inline" style="width: 115px;">
							<input readonly="readonly" name="endTime" style="width: 115px;"
								id="endTime" type="text" class="search_input_sc Wdate"
								class="text" dataType="LimitA" msg="有效结束时间不能为空."
								onclick="WdatePicker({minDate:'#F{$dp.$D(\'begTime\')}'})" />
						</div>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label" style="width: 105px;">考勤开始时间<font
						class="smart-required">*</font></label>
					<div class="layui-input-inline" style="width: 270px;">
						每天 <input readonly="readonly" name="startTime"
							style="width: 100px" id="startTime" type="text"
							class="search_input_sc Wdate" value="06:00:00"
							onclick="WdatePicker({lang:'zh-cn',dateFmt:'HH:mm:ss',quickSel:['%H-00-00','%H-30-00','%H-60-00','%H-90-00','%H-120-00']})" dataType="LimitA" msg="考勤开始时间不能为空." />
						开始新的一天考勤
					</div>
				</div>
				<div class="layui-form-item">
					<div class="layui-inline">
						<label class="layui-form-label">首次签到<font
							class="smart-required">*</font></label>
						<div class="layui-input-inline" style="width: 100px;">
							<input readonly="readonly" name="signTime" id="signTime"
								type="text" class="search_input_sc Wdate"
								onclick="WdatePicker({lang:'zh-cn',dateFmt:'HH:mm:ss'})" dataType="LimitA" msg="首次签到不能为空."/>
						</div>
					</div>
					<div class="layui-inline">
						<label class="layui-form-label">首次签退<font
							class="smart-required">*</font></label>
						<div class="layui-input-inline" style="width: 100px;">
							<input readonly="readonly" name="signoutTime" id="signoutTime"
								type="text" class="search_input_sc Wdate"
								onclick="WdatePicker({lang:'zh-cn',dateFmt:'HH:mm:ss',minDate:'#F{$dp.$D(\'signTime\')}'})" dataType="LimitA" msg="首次签退不能为空." /></input>
						</div>
					</div>
				</div>
				<div class="layui-form-item">
					<div class="layui-inline">
						<label class="layui-form-label">二次签到</label>
						<div class="layui-input-inline" style="width: 100px;">
							<input readonly="readonly" name="signTime2" id="signTime2"
								type="text" class="search_input_sc Wdate"
								onclick="WdatePicker({lang:'zh-cn',dateFmt:'HH:mm:ss',minDate:'#F{$dp.$D(\'signoutTime\')}'})" />
						</div>
					</div>
					<div class="layui-inline">
						<label class="layui-form-label">二次签退</label>
						<div class="layui-input-inline" style="width: 100px;">
							<input readonly="readonly" name="signoutTime2" id="signoutTime2"
								type="text" class="search_input_sc Wdate"
								onclick="WdatePicker({lang:'zh-cn',dateFmt:'HH:mm:ss',minDate:'#F{$dp.$D(\'signTime2\')}'})" /></input>
						</div>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label" style="width: 120px;">迟到/早退(分钟)<font
						class="smart-required">*</font></label>
					<div class="layui-input-inline" style="width: 40px;">
						<input id="lateTmie1" type="text" maxlength="2" name="lateTmie1" required value="0"
							placeholder="0" onchange="lateTmies2()"  class="layui-input" dataType="Number" msg="迟到/早退不能为空且为正数.">
					</div>
					<div class="layui-form-mid layui-word-aux">以内忽略</div>
				</div>
				<div class="layui-form-item">
					<div class="layui-inline">
						<label class="layui-form-label" style="width: 120px;">迟到/早退(分钟)<font
							class="smart-required">*</font></label>
						<div class="layui-input-inline" style="width: 40px;">
							<input type="text" readonly="readonly" name="lateTmie2" placeholder="0" id="lateTmie2" value="0"
								autocomplete="off" class="layui-input" dataType="Number" msg="迟到/早退不能为空且为正数.">
						</div>
						<div class="layui-form-mid">-</div>
						<div class="layui-input-inline" style="width: 40px;">
							<input type="text" name="lateTmie3" placeholder="0" onchange="exceedTimes()" value="60"
								autocomplete="off" class="layui-input" id="lateTmie3" dataType="Number" msg="迟到/早退不能为空且为正数.">
						</div>
						<div class="layui-form-mid layui-word-aux">
							发生扣款<font class="smart-required">*</font>
						</div>
						<div class="layui-input-inline" style="width: 40px;">
							<input type="text" name="timeBase" placeholder="0" id="timeBase" value="1"
								autocomplete="off" class="layui-input" dataType="Number" msg="时间基数不能为空且为正数">
						</div>
						<div class="layui-form-mid">分钟x</div>
						<div class="layui-input-inline" style="width: 40px;">
							<input type="text" name="debitType" placeholder="0" value="1"
								autocomplete="off" class="layui-input" id="debitType" dataType="Number" msg="扣款金额不能为空且为正数">
						</div>
						<div class="layui-form-mid">元</div>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label" style="width: 120px;">迟到/早退(分钟)</label>
					<div class="layui-input-inline" style="width: 40px;">
						<input readonly="readonly" id="exceedTime" type="text" maxlength="2" name="exceedTime" required
							placeholder="0" class="layui-input" value="60">
					</div>
					<div class="layui-form-mid layui-word-aux">分钟以上 视为旷工 ，不计入考勤工时</div>
				</div>
				<input type="hidden" id="pNumber" name="pNumber" class="text"
					value=""></input>
			</form>
		</div>
		<div class="smart-cell smart-cell_rt">
			<blockquote class="layui-elem-quote layui-quote-nm">应用到工人</blockquote>
			<div class="smart-table_toptit">
				当前应用人数: <span id="pNum">0</span>
				<div class="smart-table_toptit_rt">
					<a href="#" onclick="workerAdd()">新增工人</a>
				</div>

			</div>
			<table class="layui-table" lay-skin="line">
				<thead>
					<tr>
						<th>姓名</th>
						<th>工号</th>
						<th>工种</th>
						<th>班组</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody id="tbodyData">

				</tbody>
			</table>
			<!--           ######分页开始 ######             -->

			<div class="tableData"></div>

			<!--           ######分页结束 ######              -->
		</div>
		<div class="smart-footer_btn" style="padding-top:10px;">
			<button class="layui-btn layui-btn-primary"
				onclick="closeAttendance();">取消</button>
			<button class="layui-btn" onclick="attendanceAdd()">保存</button>
		</div>
	</div>
	</div>
</body>

</html>